/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmMaterialappvouchChecks extends BasicModel<PmMaterialappvouchChecks> {
  parentId?: string; // 主表ID
  projectno?: string; // 项目编号
  mcode?: string; // 材料编号
  iqty?: number; // 原始库领量
  sjKlQty?: number; // 实际库领量
  pmMaterialappvouchCheckList?: any[]; // 子表列表
}

export const pmMaterialappvouchChecksList = (params?: PmMaterialappvouchChecks | any) =>
  defHttp.get<PmMaterialappvouchChecks>({
    url: adminPath + '/material/app/pmMaterialappvouchChecks/list',
    params,
  });

export const pmMaterialappvouchChecksListData = (params?: PmMaterialappvouchChecks | any) =>
  defHttp.post<Page<PmMaterialappvouchChecks>>({
    url: adminPath + '/material/app/pmMaterialappvouchChecks/listData',
    params,
  });

export const pmMaterialappvouchChecksForm = (params?: PmMaterialappvouchChecks | any) =>
  defHttp.get<PmMaterialappvouchChecks>({
    url: adminPath + '/material/app/pmMaterialappvouchChecks/form',
    params,
  });

export const pmMaterialappvouchChecksSave = (params?: any, data?: PmMaterialappvouchChecks | any) =>
  defHttp.postJson<PmMaterialappvouchChecks>({
    url: adminPath + '/material/app/pmMaterialappvouchChecks/save',
    params,
    data,
  });

export const pmMaterialappvouchChecksDelete = (params?: PmMaterialappvouchChecks | any) =>
  defHttp.get<PmMaterialappvouchChecks>({
    url: adminPath + '/material/app/pmMaterialappvouchChecks/delete',
    params,
  });
